<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%@page import="org.corey.share.throwable.ValidationUserException"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String root = request.getContextPath();
%>
<html>
	<head>
		<title>Corey--分享自由---登录</title>
	<STYLE type="text/css">
	<!--
		#form_container {
			width:833px;
			height:465px;
			margin-left:auto;
			margin-right:auto;
			background-image:url(<%=root%>/images/login_bg2.gif);
			margin-bottom:10px;
		}
		.form_navigation {
			position:absolute;
			top:100px;
			left:270px;
			width:145px;
		}
		.form_navigation a,a:visited {
			text-decoration: none;
			color:#333333;
		}
		.form_navigation a:hover{
			position:relative;
			top:1px;
			left:1px;
		}
		.login_navigator {
			margin-top:20px;
			margin-left:50px;
			font-size:20px;
		}
		.repassword_navogator {
			margin-top:45px;
			margin-left:50px;
			font-size:20px;
		}
		.forms{
			position:absolute;
			top:90px;
			left:440px;
			width:320px;
			height:270px;
		}
		.form_content .input_pre {
			width:70px;
			float:left;
		}
		.form_content .form_item{
			margin-top:20px;
			margin-left:20px;
		}
		.form_content .input_text {
			width:200px;
		}
		.form_content .no_pre_label{
			margin-left:73px;
		}
		
		.submit_btn {
			width:56px;
			height:23px;
			background-image:url(<%=root%>/images/buttons.gif);
			background-position:0 1;
			background-repeat: no-repeat;
			border:0px;
			color:#FFFFFF;
			font-weight:BOLD;
			font-size:10px;
			padding-top:3px;
		}
		
		.submit_btn_on {
			width:56px;
			height:23px;
			background-image:url(<%=root%>/images/buttons.gif);
			background-position:0 29;
			background-repeat: no-repeat;
			border:0px;
			color:RED;
			font-weight:BOLD;
			font-size:10px;
			padding-top:3px;
		}
	-->
	</STYLE>
	<script type="text/javascript"
			src="<%=root%>/scripts/jquery-1.3.2.min.js"></script>	
	<SCRIPT type="text/javascript">
	<!--
		$(function(){
			$('.login_navigator a').click(function(){
				$("#repassword_form_content").hide();
				$("#login_form_content").fadeIn(2000);
			});
			$('.repassword_navogator a').click(function(){
				$("#login_form_content").hide();
				$("#repassword_form_content").fadeIn(2000);
			});
		});
	-->
	</SCRIPT>		
	</head>
	<body>
		<div id="content_area_content">
			<div id="form_container">
				<div class="form_navigation">
					<div class="login_navigator">
						<a href=###  style="handle">登&nbsp;&nbsp;&nbsp;&nbsp;陆</a>
					</div>
					<div class="repassword_navogator">
						<a href=###  style="handle">修改密码</a>
					</div>
				</div>
				<div class="forms">
					<div id="login_form_content" class="form_content">
						<form action="<%=root%>/user/login.action" method="post">
							<div class="form_item">
								<span style="color:RED">
									<%
										String errorMsg="";
										ValueStack vs=(ValueStack)request.getAttribute("struts.valueStack");
									 	if(vs!=null){
									 		ValidationUserException ex=(ValidationUserException)vs.findValue("exception");
									 		if(ex!=null){
									  %>		
									  <%=(errorMsg=ex.getUnvalidationMsg().getMsgText())%>
									 <%
									 		}
									 	}
									 %>
								</span>
							</div>
							<div class="form_item">
								<label class="input_pre">用户名:</label>
								<input type="text" name="userName" class="input_text"/>
							</div>
							<div class="form_item">
								<label class="input_pre">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
								<input type="password" name="password" class="input_text"/>
							</div>
							<div class="form_item">
								<input type="checkbox" class="no_pre_label"/><label>记住用户名</label>
							</div>
							<div class="form_item">
								<input type="submit" value="登陆" class="no_pre_label submit_btn" onmouseout="this.className='no_pre_label submit_btn'"  onmouseover="this.className='no_pre_label submit_btn_on'"/>
							</div>
						</form>
					</div>
					<div id="repassword_form_content" class="form_content" style="display:none">
						<form action="<%=root%>/user/repassword.action" method="get">
							<div class="form_item">
								<span style="color:RED"><%=errorMsg%></span>
							</div>
							<div class="form_item">
								<label class="input_pre">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户名:</label>
								<input type="text" name="userName" class="input_text"/>
							</div>
							<div class="form_item">
								<label class="input_pre">您的旧密码:</label>
								<input type="password" name="oldPassword" class="input_text"/>
							</div>
							<div class="form_item">
								<label class="input_pre">您的新密码:</label>
								<input type="password" name="newPassword" class="input_text"/>
							</div>
							<div class="form_item">
								<label class="input_pre">新密码确认:</label>
								<input type="password" name="newPassword_2" class="input_text"/>
							</div>
							<div class="form_item">
								<input type="submit" value="更改" class="no_pre_label submit_btn" onmouseout="this.className='no_pre_label submit_btn'"  onmouseover="this.className='no_pre_label submit_btn_on'"/>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</body>
</html>
